package com.swl.service.impl;

import com.swl.dao.ScoreDao;
import com.swl.pojo.Score;
import com.swl.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ScoreServiceImpl implements ScoreService {
    @Autowired
    private ScoreDao scoreDao;

    @Override
    public int updateScore(String userName, int sum) {
        return scoreDao.updateScore(userName,sum);
    }

    @Override
    public Score selectByName(String userName) {
        return scoreDao.selectByName(userName);
    }

    @Override
    public int insertScore(String userName) {
        return scoreDao.insertScore(userName);
    }
}
